#include<iostream>
using namespace std;

/* Zadacha 1
int main()
{
    double a,b,c;
    cout<<"Insert a:";
    cin>>a;
    cout<<"Insert b:";
    cin>>b;
    cout<<"Insert c:";
    cin>>c;
    if((c<=a && c>=b) || (c<=b && c>=a)) {
        cout<<c<<" is between "<<a<<" and "<<b<<endl;
    }
    else {
        cout<<c<<" is not in ["<<a<<";"<<b<<"]"<<endl;
    }
    return 0;
} */


/* Zadacha 2
int main()
{
    int a,b;
    double c,d;
    int sumab ,difab,prab;
    double chab;
    cout<<"Insert a:"; cin>>a;
    cout<<"Insert b:"; cin>>b;
    cout<<endl;
    sumab = a+b;
    difab = a-b;
    prab = a*b;
    cout<<a<<" + "<<b<<" = "<<sumab<<endl;
    cout<<a<<" - "<<b<<" = "<<difab<<endl;
    cout<<a<<" * "<<b<<" = "<<prab<<endl;
    if(b==0) {

        cout<<"Ne se deli na 0 !!!"<<endl;
    }
    else {
        chab = (double)a / b;
        cout<<a<<" / "<<b<<" = "<<chab<<endl<<endl;
    }
    cout<<"Insert c:"; cin>>c;
    cout<<"Insert d:"; cin>>d;
    cout<<endl;

    double sumcd = c+d,difcd = c-d,prcd = c*d;
    double chcd;
    cout<<c<<" + "<<d<<" = "<<sumcd<<endl;
    cout<<c<<" - "<<d<<" = "<<difcd<<endl;
    cout<<c<<" * "<<d<<" = "<<prcd<<endl;
    if(d == 0.0) {
        cout<<"Ne se deli na 0!!!"<<endl;
    }
    else {
        chcd = c/d;
        cout<<c<<" / "<<d<<" = "<<chcd<<endl;
    }
    return 0;
}  */


/* Zadacha 3
int main()
{
    int a,b;
    cout<<"Insert a:";
    cin>>a;
    cout<<"Insert b:";
    cin>>b;
    cout<<"a = "<<a<<endl<<"b = "<<b<<endl;
    int x;
    x=a;
    a=b;
    b=x;
    cout<<"a = "<<a<<endl<<"b = "<<b<<endl;
    return 0;
} */


/* Zadacha 4
int main()
{
    int a,b;
    cout<<"Insert a:";
    cin>>a;
    cout<<"Insert b:";
    cin>>b;
    if(a>=b) {
        cout<<b<<"  "<<a<<endl;
    }
    else {
        cout<<a<<"  "<<b<<endl;
    }
    return 0;
}  */



/* Zadacha 5
int main()
{
    int a,b,c;
    cout<<"Insert a:";
    cin>>a;
    cout<<"Insert b:";
    cin>>b;
    cout<<"Insert c:";
    cin>>c;
    if(a>b) {
        int x=a;
        a=b;
        b=x;
    }
    if(c<=a)
        cout<<c<<"  "<<a<<"  "<<b;
    if(c>=b)
        cout<<a<<"  "<<b<<"  "<<c;
    if(c>=a && c<=b)
        cout<<a<<"  "<<c<<"  "<<b;
    return 0;
}*/


/* Zadacha 6
int main()
{
    int a1,a2,a3;
    cout<<"Insert a1:";
    cin>>a1;
    cout<<"Insert a2:";
    cin>>a2;
    cout<<"Insert a3:";
    cin>>a3;
    int swap = a1;
    a1=a2;
    a2=a3;
    a3=swap;
    cout<<"a1 = "<<a1<<endl;
    cout<<"a2 = "<<a2<<endl;
    cout<<"a3 = "<<a3<<endl;
    return 0;
} */



/* Zadacha 7
int main()
{
    int hour;
    double money;
    bool amHealthy;
    cout<<"Time:";
    cin>>hour;
    cout<<"Money:";
    cin>>money;
    cout<<"Am I healthy:";
    cin>>amHealthy;
    if(amHealthy == false) {
        if(money > 0)
            cout<<"I will buy medicaments!";
        else {
            cout<<"I will drink tea!";
        }
    }
    else {
        if(money < 10)
            cout<<"I will go out!";
        else {
            cout<<"I will go to casino!";
        }
    }
    return 0;
}
*/



/* Zadachata ot chas
int main()
{
    int date,month,year;
    bool isLeap = (year%4==0 && year%100!=0) || year%400==0;
    cin>>date>>month>>year;
    if((month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12 ) && date>31 || date<1)
        cout<<"Invalid date!";
    if((month == 4 || month == 6 || month == 9 || month == 11) && date>30 || date<1)
        cout<<"Invalid date!";
    if(!isLeap && month==2 && date>28)
        cout<<"Invalid date!";
    if(isLeap && month==2 && date>29)
        cout<<"Invalid date!";
    if((month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12 ) && date<31 && date>0)
        cout<<++date<<"  "<<month<<"  "<<year;
    if((month == 4 || month == 6 || month == 9 || month == 11) && date<30 && date>0)
        cout<<++date<<"  "<<month<<"  "<<year;
    if((month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10) && date == 31)
        cout<<"1  "<<++month<<"  "<<year;
    if((month == 4 || month == 6 || month == 9 || month == 11) && date == 30)
        cout<<"1  "<<++month<<"  "<<year;
    if(month == 12 && date == 31)
        cout<<"1  1  "<<++year;
    if(isLeap && month==2 && date<29 && date>0)
        cout<<++date<<"  2  "<<year;
    if(!isLeap && month==2 && date<28 && date>0)
        cout<<++date<<"  2  "<<year;
    if(isLeap && month == 2 && date ==29)
        cout<<"1  3  "<<year;
    if(!isLeap && month ==2 && date == 28)
        cout<<"1  3  "<<year;
    return 0;
}
*/
